package com.fy56.platform.logistics.common;

/**
 * 自定义请求状态码
 * @author ScienJus
 * Created by li on 2018-02-01 16:05
 */
public enum ResultStatus {
    SUCCESS(100, "成功"),
    CLIENT_ERROR(101, "客户端错误"),
    SERVER_ERROR(201, "服务端错误"),
    EXIST_ERR(-100, "用户已注册"),
    USERNAME_OR_PASSWORD_ERROR(-101, "密码错误"),
    USER_NOT_FOUND(-102, "手机号未注册"),
    USER_NOT_LOGIN(-103, "用户未登录"),
    INSERT_ERR(-104, "添加失败"),
    EDIT_ERR(-105, "修改失败"),
    READ_ERR(-106, "读取失败"),
    WX_IS_EXIST(-108, "该账号已绑定其它微信号"),
    OPEN_ID_ERR(-109, "OPENID参数出错"),
    DELETE_ERR(-107, "删除失败");

    /**
     * 返回码
     */
    private int code;

    /**
     * 返回结果描述
     */
    private String message;

    ResultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
